/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-05-17
 * Time: 23:00
 */
public class test53 {
//    一个用户表，一个订单表，找出每个用户购买的产品数量并按购买数量降序排序，若有多个用户购买数量相同，按userid升序排序
    /*
    select User.user_id , User.user_name , count(Orders.order_id) as purchase_count from User left join Orders
    on User.user_id = Orders.user_id group by User.user_id order by purchase_count desc , User.user_id asc;

     */
}
